﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Yatagan.WindowsApp.Data;
using Yatagan.WindowsApp.Business.Domain;
using Yatagan.IoC;

namespace Yatagan.WindowsApp.Business.Service
{
    internal class PersonService : IPersonService
    {
        IRepository _repository;

        public PersonService()
        {
            InitializeDependencies(null);
        }

        [IoCAspect]
        private void InitializeDependencies(IRepository repository)
        {
            this._repository = repository;
        }

        #region IPersonService Members

        public void Insert(Person p)
        {
            _repository.Insert<Person>(p);
        }

        #endregion
    }
}
